cmake_minimum_required(VERSION 3.5)
project(CameraIntrinsicsCalib)

set(CMAKE_BUILD_TYPE "Debug")
message("Build type: " ${CMAKE_BUILD_TYPE})
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-O3 -Wall -std=c++11")

set(OpenCV_DIR /usr/local/include/opencv4/opencv2)
find_package(OpenCV 4 REQUIRED)
message(STATUS "Opencv library status: ")
message(STATUS "> version: ${OpenCV_VERSION} ")
message(STATUS "> libraries: ${OpenCV_LIBS}")
message(STATUS "> include: ${OpenCV_INCLUDE_DIRS} ")

find_package(Ceres REQUIRED)

include_directories(
 ${PROJECT_SOURCE_DIR}/include
 ${OpenCV_INCLUDE_DIRS}
 ${CERES_INCLUDE_DIRS}
)

add_executable(main src/main.cpp src/camera_calib.cpp)
target_link_libraries(main ${OpenCV_LIBS} ${CERES_LIBRARIES})